#include <iostream>
#include <algorithm>
#include <tuple>

using namespace std;

void debug()
{
	cout << endl;
}

template <typename T, typename ... Args>
void debug(T first, Args ... last)
{
	cout  << typeid(T).name() << ":" << first << " ";
	debug(last...);
}

template <typename... T>
auto hMax(T... args) 
{ 
	return std::max({ static_cast<typename std::common_type<T...>::type>(args)... });
}


int main()
{
#if 0
	int a = 1;
	short b = 2;
	cout << max(a, b) << endl;
#else
	int a = 1;
	short b = 2;
	char c = 3;
	float d = 4.1f;
	double e = 5.2;
	cout << hMax(a, b, c, d, e) << endl;
#endif

	return 0;
}